import java.security.Permission;
public class DefaultSecurityManager extends SecurityManager{
//    @Override
//    public void checkPermission(Permission perm) {
//        System.out.println("默认不做任何限制");
//        System.out.println(perm);
//    }
    @Override
    public void checkPermission(Permission perm) {
//        throw new SecurityException("不开放任何权限校验");
    }
    @Override
    public void checkRead(String file) {
//        throw new SecurityException("不开放读权限" + file);
    }
    @Override
    public void checkWrite(String file) {
//        throw new SecurityException("不开放写权限" + file);
    }
    @Override
    public void checkExec(String cmd) {
        throw new SecurityException("不开放执行权限" + cmd);
    }
    @Override
    public void checkConnect(String host,int port) {
        throw new SecurityException("不开放网络连接" + host + port);
    }
}
